/* http://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require
Both CommonJS and AMD generally have the concept of an exports object which contains all exports from a module.

They also support replacing the exports object with a custom single object. Default exports are meant to act as a replacement for this behavior; however, the two are incompatible. TypeScript supports export = to model the traditional CommonJS and AMD workflow.

The export = syntax specifies a single object that is exported from the module. This can be a class, interface, namespace, function, or enum.

When exporting a module using export =, TypeScript-specific import module = require("module") must be used to import the module.
*/
/** ts独有的 export = 和 import = require */
import zip/** 相当于es6 导入默认导出,可以自定义导入的模块名字*/ = require("./x");
/** 类似于es6↓ */
// import zip from './x';

// Some samples to try
let strings = ["Hello", "98052", "101"];

// Validators to use
let validator = new zip();

// Show whether each string passed each validator
strings.forEach(s => {
  console.log(`"${s}" - ${validator.isAcceptable(s) ? "matches" : "does not match"}`);
});


/** 没错ts默认支持es6语法*/
